<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <!-- <input type="color"> -->
  <script>
    const whiteList = ['/login', '/404']
    // console.log(whiteList.indexOf('/aaa')); // indexOf 检测数组元素 有就返回对应的第一个元素下标,检测不到就返回-1
  console.log(whiteList.includes('a'));
  console.log(whiteList.includes('/404'));
  // includes是数组的方法 , 检测数组中是否包含某个元素, 包含就返回true,不包含就返回false
  // 字符串也有这个方法 
  const str = 'abcd'
  console.log(str.includes('x'))
  console.log(str.includes('ab'))
  </script>
</body>
</html>